{% extends "html/base.html" %}

{% block title %}Criar Mecânica{% endblock %}

{% block head %}
	<link rel="stylesheet" type="text/css" href="images/view.css" media="all">
	<style type="text/css">	
		.description {
			font-size: 12px;
		}
    </style>
{% endblock %}


{% block body %}
	<div id="form_container">
		<form id="formCriaMecanica" class="appnitro" enctype="multipart/form-data" method="post" action="/criarMecanica">
			<h1>Criar mecânica</h1>
			<br />
			<div class="padding">
				<label class="description"><b>Nome</b></label>
				<input id="nome" name="nome" class="element text" maxlength="255" size="8" value=""/>
			</div>
			<div class="padding">
				<label class="description"><b>Tipo</b></label>
				<div>
					<select class="element select small" id="element_4" name="tipo">
						{% if tipo != None %}
							{% if tipo == 0 %}
								<option value="1" selected="selected">Lugar</option>
							{% elif tipo == 1 %}
								<option value="2" selected="selected">Roupa</option>
							{% elif tipo == 2 %}
								<option value="3" selected="selected">Filme</option>
							{% elif tipo == 3 %}
								<option value="4" selected="selected">Hobby</option>
							{% elif tipo == 4 %}
								<option value="5" selected="selected">Música</option>
							{% elif tipo == 5 %}
								<option value="6" selected="selected">Jogo</option>
							{% elif tipo == 6 %}
								<option value="7" selected="selected">Livro</option>
							{% elif tipo == 7 %}
								<option value="8" selected="selected">Cinética</option>
							{% endif %}
						{% else %}
							<option value="1" selected="selected">Lugar</option>
							<option value="2">Roupa</option>
							<option value="3">Filme</option>
							<option value="4">Hobby</option>
							<option value="5">Música</option>
							<option value="6">Jogo</option>
							<option value="7">Livro</option>
							<option value="8">Cinética</option>
						{% endif %}
					</select>
				</div>
			</div>
			<div class="padding">
				<label class="description"><b>Descrição</b></label>
				<input id="descricao" name="descricao" class="element text" maxlength="255" size="30" value=""/>
			</div>
			<div class="padding">
				<label class="description"><b>Imagem da sua Mecânica</b></label>
				<input id="img" name="img" class="element file" type="file"/> 
			</div>
		
			{% if vincc %}
				<input type="hidden" name="vincc" value="1" />
			{% endif %}
			
			{% if vinc %}
				<input type="hidden" name="vinc" value="1" />
			{% endif %}
			
			{% if cinetica %}
				<input type="hidden" name="cinetica" value="1" />
			{% endif %}
			
			<div class="divCenter">
				<input id="saveForm" class="defaultButton" type="submit" name="submit" value="Criar" />
			</div>
		</form>	
	</div>
{% endblock %}

{% block jsBlock %}
	<script type="text/javascript" src="images/view.js"></script>
{% endblock %}

	